﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Team6_Algorithms.Filters;
//written by Dylan
namespace VisionApplication
{
    public class Settings
    {

        public List<string> requiredList = new List<string>();

        public int Size;
        public int Percentage;
        public int Rows;
        public int Width;
        public Mask mask;
        public string MaskName;
        public bool Max;
        public int TresHold;
        public int HueLow, HueHigh;
        public int SaturationLow, SaturationHigh;
        public int LightnessLow, LightnessHigh;

        public Settings(string[] required){
            if (required != null)
            {
                foreach (string s in required)
                {
                    requiredList.Add(s);
                }
            }
            
        }

        public override string ToString(){
            string ToString = "";
            foreach (string s in requiredList)
            {
                ToString += " "+s + ": ";
                switch (s)
                {
                    case "size":
                        ToString += Size;
                        break;

                    case "percentage":
                        ToString += Percentage;
                        break;

                    case "rows":
                        ToString += Rows;
                        break;

                    case "width":
                        ToString += Width;
                        break;

                    case "mask":
                        ToString += MaskName;
                        break;

                    case "max":
                        ToString += Max.ToString();
                        break;

                    case "treshold":
                        ToString += TresHold;
                        break;

                    case "HSL":
                        ToString += "Low:" + HueLow + "," + SaturationLow + "," + LightnessLow;
                        ToString += "High:" + HueHigh + "," + SaturationHigh + "," + LightnessHigh;
                    break;
                }
            }
            return ToString;
        }

        public Settings Clone()
        {
            return (Settings) this.MemberwiseClone();
        }
    }
}
